package com.thx.org.dao;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.thx.common.orm.PaginationDao;
import com.thx.org.model.Company;

@Repository
public class CompanyDao extends PaginationDao<Company>{

	public Company findByName(String comName) {
		String hql = "from Company where comName = ?";
		List<Company> coms = createQuery(hql, comName).list();
		if (coms != null && coms.size() > 0)
			return coms.get(0);
		return null;
	}

}
